﻿Imports System.Text
Imports D2L.Extensibility.AuthSdk
Imports RestSharp
Imports D2L.Extensibility.AuthSdk.Restsharp

<TestClass()>
Public Class OrgTeste

    Private _authObj As Authenticate.Authenticate = New Authenticate.Authenticate()
    Protected method As Authenticate.Service

    'http://docs.valence.desire2learn.com/res/tools.html#Tools.OrgInformation
    'http://docs.valence.desire2learn.com/res/tools.html#get--d2l-api-lp-(version)-tools-org-
    'Protected Const ROUTE_ORG_TOOLS As String = "/d2l/api/lp/" + OrgTeste.LP_VERSION + "/tools/org/"

    ''' <summary>
    ''' Recupera as informações atuais de nível organizacional para todas as ferramentas
    ''' </summary>
    ''' <remarks></remarks>
    <TestMethod()>
    Public Sub get_org_tools()

        method = New Authenticate.Service

        Dim _response As RestSharp.IRestResponse(Of Api.PagedResultSet) = _authObj.ExecuteService_with_UserContext(method.GetOrgTools, RestSharp.Method.GET, Type.PagedResultSet)

        Console.WriteLine("{0}{1}", "Response:", _response.ToString())
        Console.WriteLine("Response Content: {0}", _response.Content.ToString())

        Assert.IsNotNull(_response)
        Assert.AreEqual("OK", _response.StatusCode.ToString())

    End Sub

End Class
